from utils.name_generator import generator

class Job():

    def __init__(self,name=None, exc_func=None,exc_func_args=None,
            next_func=None, next_func_args=None,
            next_jobs=None, call_back=None, task_name=None):

        self.task_name = task_name
        self.name = name
        if name is None:
            self.name = generator()
        self.exc_func = exc_func
        self.exc_func_args = exc_func_args
        self.next_func = next_func
        self.next_func_args = next_func_args
        self.next_jobs = next_jobs
        self.call_back = call_back

    def __str__(self):
        return 'Job - ' + self.name

    def __repr__(self):
        return 'Job - ' + self.name
